// src/services/auth.js
import api from './api';

// 登录请求
export const login = (username, password) => {
  return api.post('/auth/login', {
    username,
    password,
  });
};

// 注册请求
export const register = (userData) => {
  return api.post('/auth/register', userData);
};

// 获取当前用户信息
export const getCurrentUser = () => {
  return api.get('/auth/user');
};
